package com.hkjtgc.pcr_app.service

import com.hkjtgc.pcr_app.entity.bean.DataBean
import com.hkjtgc.pcr_app.util.Constant
import retrofit2.Call
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST

interface LoginService {

    @FormUrlEncoded
    @POST(Constant.USER_LOGIN_URL)
    suspend fun login(
        @Field("account") account: String,
        @Field("password") password: String
    ): BaseResponse<DataBean>


    @GET(Constant.GET_PROFILE_URL)
    suspend fun getUser():BaseResponse<DataBean>
}

data class BaseResponse<T>(var data: T, var code: Int, var msg: String, var ok: Boolean)

